{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 细调xgboost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from xgboost import XGBClassifier\n",
    "import xgboost as xgb\n",
    "\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "\n",
    "from sklearn.metrics import log_loss\n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "train = pd.read_csv(\"./RentListingInquries_FE_train.csv\")\n",
    "test = pd.read_csv(\"./RentListingInquries_FE_test.csv\")\n",
    "train = train[:2000]\n",
    "test = test[:1000]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_train = train['interest_level']\n",
    "\n",
    "X_train = train.drop(['interest_level'],axis=1)\n",
    "# X_train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "kfold = StratifiedKFold(n_splits=5,shuffle=True,random_state=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'max_depth': [2, 3, 4], 'min_child_weight': [2, 3, 4]}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "max_depth = [2,3,4]\n",
    "min_child_weight =[2,3,4]\n",
    "param_test2_1 = dict(max_depth=max_depth,min_child_weight = min_child_weight)\n",
    "param_test2_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\model_selection\\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in version 0.18 in favor of the more elaborate cv_results_ attribute. The grid_scores_ attribute will not be available from 0.20\n",
      "  DeprecationWarning)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "([mean: -0.70138, std: 0.01449, params: {'max_depth': 2, 'min_child_weight': 2},\n",
       "  mean: -0.70181, std: 0.01360, params: {'max_depth': 2, 'min_child_weight': 3},\n",
       "  mean: -0.70200, std: 0.01353, params: {'max_depth': 2, 'min_child_weight': 4},\n",
       "  mean: -0.69146, std: 0.01054, params: {'max_depth': 3, 'min_child_weight': 2},\n",
       "  mean: -0.68960, std: 0.01311, params: {'max_depth': 3, 'min_child_weight': 3},\n",
       "  mean: -0.69159, std: 0.01243, params: {'max_depth': 3, 'min_child_weight': 4},\n",
       "  mean: -0.69136, std: 0.01565, params: {'max_depth': 4, 'min_child_weight': 2},\n",
       "  mean: -0.68999, std: 0.01703, params: {'max_depth': 4, 'min_child_weight': 3},\n",
       "  mean: -0.69043, std: 0.01613, params: {'max_depth': 4, 'min_child_weight': 4}],\n",
       " {'max_depth': 3, 'min_child_weight': 3},\n",
       " -0.68959931282140319)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xgb2_1 = XGBClassifier(\n",
    "    learning_rate = 0.1,\n",
    "    n_estimators = 47,\n",
    "    max_depth=5,\n",
    "    min_child_weight=1,\n",
    "    gamma=0,\n",
    "    subsample=0.3,\n",
    "    colsample_bytree=0.8,\n",
    "    colsample_bylevel=0.7,\n",
    "    objective='multi:softprob',\n",
    "    seed=3)\n",
    "gsearch2_1 = GridSearchCV(xgb2_1,param_grid=param_test2_1,scoring='neg_log_loss',n_jobs=-1,cv=kfold)\n",
    "gsearch2_1.fit(X_train,y_train)\n",
    "\n",
    "gsearch2_1.grid_scores_, gsearch2_1.best_params_, gsearch2_1.best_score_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Best: -0.689599 using {'max_depth': 3, 'min_child_weight': 3}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split0_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split1_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split2_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split3_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "D:\\train\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split4_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAELCAYAAADz6wBxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3X18VdWd7/HPLyfPPD+EZwIUoSKC\nQSlavVroDIq11bF6LbT2Wmeqc7WOY3vrqLedOlptbXunYltq61i1Y2u1tqOllio6Wm1RqoCgggqI\nEEJAkAd5CCQ5J7/7x94n2TmcJCc5OQmQ7/v1Oq/ss/ba+6yzk+zfXmvtvZa5OyIiIh2V190FEBGR\no5sCiYiIZEWBREREsqJAIiIiWVEgERGRrCiQiIhIVhRIREQkKwokIiKSFQUSERHJSn53F6ArDB48\n2MeOHdvdxRAROaosX778fXcvaytfjwgkY8eOZdmyZd1dDBGRo4qZbcokn5q2REQkKwokIiKSFQUS\nERHJigKJiIhkRYFERESyktNAYmZzzOxtM1tvZjemWX+nma0MX2vNbE9k3WVmti58XRamlZrZH8zs\nLTNbbWZ35LL8IiLStpzd/mtmMWABMBuoAl4xs4XuviaZx92/HMn/T8C0cHkgcDMwHXBguZktBGqB\n/+fuz5lZIfDfZnauu/8xV99DRERal8vnSGYA6919A4CZPQxcAKxpIf88guABcA7wtLvvCrd9Gpjj\n7r8CngNw9zozWwGMyt1XEBHpGokGpz7RQLzBSSSc+oYG4ommtHiigfqEE28If4bp9YkgX2N64/pg\n+YKKkfQrKchp2XMZSEYCmyPvq4BT02U0szHAOODZVrYdmbJNf+BTwF0t7PNK4EqA8vLy9pdeRI5o\n7h6eYJtOuvFEA/UpJ93oyfiwk27KiTm5bbp9JtJun7rN4dunCwTN04O87rk5TqePH3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sWNDufWT8WRnkaQhH8r0QmO/uPzSzV3NSGhE5otzy+9Wsqd7bqfs8YURfbv7U\n5BbX33jjjbzzzjtUVFQwe/ZshgwZwq9//Wtqa2u58MILueWWWzhw4ACXXHIJVVVVJBIJ/vVf/5X3\n3nuP6upqZs2axeDBg3nuuefS7r9379586Utf4plnnmHAgAF861vf4l/+5V+orKxk/vz5nH/++Wzc\nuJHPf/7zHDhwAIAf/ehHnH766Tz22GMsWLCAp59+mm3btvGxj32MF154gWHDhh32OQcPHuTyyy9n\nzZo1TJo0iYMHDzauW7x4MTfffDO1tbWMHz+e+++/n969ezN27Fg+85nPNJb9oYceYvv27SxcuJDn\nn3+e2267jd/+9rcAPProo1x99dXs2bOHn/3sZ5x55pnNPn/48OEMHz4cgD59+jBp0iS2bNnCCSec\n0I7fVmYyqZHUm9k84DLgiTCtYzcbi4i04Y477mD8+PGsXLmS2bNns27dOl5++WVWrlzJ8uXLeeGF\nF3jyyScZMWIEq1at4o033mDOnDlce+21jBgxgueee67FIAJw4MABZs6cyfLly+nTpw9f//rXefrp\np3nsscf4xje+AcCQIUN4+umnWbFiBY888gjXXnstABdeeCHDhg1jwYIFXHHFFdxyyy1pgwjA3Xff\nTWlpKa+99hpf+9rXWL58OQDvv/8+t912G8888wwrVqxg+vTpfP/7TRO99u3bl5dffplrrrmG6667\njtNPP53zzz+f733ve6xcuZLx48cDEI/Hefnll5k/fz633HILANXV1XziE584rCwbN27k1Vdf5dRT\nT+3Ab6RtmdRILgf+N3C7u79rZuOAX+SkNCJyRGmt5tAVFi9ezOLFi5k2bRoA+/fvZ926dZx55pl8\n9atf5YYbbuCTn/zkYVfjrSksLGTOnDkATJkyhaKiIgoKCpgyZQobN24Egocyr7nmGlauXEksFmPt\n2rWN2//whz/kxBNP5LTTTmPevHktfs4LL7zQGICmTp3K1KlTAVi6dClr1qzhjDPOAKCuro6PfvSj\njdsl9zlv3jy+/OUvt7j/T3/60wCccsopjeUeMWIEixYtapZv//79XHTRRcyfP5++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Pzawh3PYOd1/TheW61szOJzgmuwju4sr1/2Mm5YKgk/3h8O89KZfH\nK63u+vvSk+0iIpKVHt1HIiIi2VMgERGRrCiQiIhIVhRIREQkKwokIiKSFQUSERHJigKJyBHCgiHt\nB3dw2y+Y2YjO2JdIeymQiBwbvgCMaCuTSC4okIikMLOxZvaWmd1rwURYvzSzvzWzJRZMnDQjfL0Y\nTir0opl9ONz2K2Z2X7g8Jdy+tIXPGWRmi8N9/JTIYHpmdqkFEyqtNLOfhk9WY2b7zezfzWyFBZNO\nlZnZxQSDK/4yzF8S7uafwnyvm9nxuTxm0rMpkIikdxxwFzAVOJ5g9Nb/AXyVYAiWt4Cz3H0awZA1\n3wq3mw8cZ2YXAvcD/+hNc3ukuhn4S7iPhYTDupjZJOAzBCMTVwAJ4HPhNr2AFR6MWPw8cLO7/wZY\nBnzO3Svc/WCY9/0w391huUVyoiePtSXSmnfd/XUAM1sN/Le7u5m9DowlGATy52Y2gWAI7gIAd28w\nsy8ArwE/dfclrXzGWcCnw+3+YGbJycr+hmBk21fCsa5KCObCgGDuiUfC5V8ArY12nFy3PPk5Irmg\nQCKSXm1kuSHyvoHg/+abwHPufqEFE2r9KZJ/ArCfzPos0g12Z8DP3f2mDm6flCxzAv2vSw6paUuk\nY/oBW8LlLyQTzawfQZPYWcCgsP+iJS8QNlmZ2bkEw44D/DdwsZkNCdcNDGffg+B/NrnPzwJ/CZf3\nEcxZL9LlFEhEOua7wLfNbAnB0PhJdwI/dve1BLNX3pEMCGncApxlZiuAswnmbyEcavzrBFMAv0Yw\nB/nwcJsDwGQzWw58HLg1TH8A+ElKZ7tIl9Aw8iJHETPb7+69u7scIlGqkYiISFZUIxHJMTO7HPjn\nlOQl7v6l7iiPSGdTIBERkayoaUtERLKiQCIiIllRIBERkawokIiISFYUSEREJCv/H+G1qGjudl+r\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xcb41630>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# summarize results\n",
    "print(\"Best: %f using %s\" % (gsearch2_1.best_score_, gsearch2_1.best_params_))\n",
    "test_means = gsearch2_1.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = gsearch2_1.cv_results_[ 'std_test_score' ]\n",
    "train_means = gsearch2_1.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = gsearch2_1.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "pd.DataFrame(gsearch2_1.cv_results_).to_csv('my_preds_maxdepth_min_child_weights_1.csv')\n",
    "\n",
    "# plot results\n",
    "test_scores = np.array(test_means).reshape(len(max_depth), len(min_child_weight))\n",
    "train_scores = np.array(train_means).reshape(len(max_depth), len(min_child_weight))\n",
    "\n",
    "for i, value in enumerate(max_depth):\n",
    "    pyplot.plot(min_child_weight, -test_scores[i], label= 'test_max_depth:'   + str(value))\n",
    "#for i, value in enumerate(min_child_weight):\n",
    "#    pyplot.plot(max_depth, train_scores[i], label= 'train_min_child_weight:'   + str(value))\n",
    "    \n",
    "pyplot.legend()\n",
    "pyplot.xlabel( 'max_depth' )                                                                                                      \n",
    "pyplot.ylabel( 'Log Loss' )\n",
    "pyplot.savefig('max_depth_vs_min_child_weght_2.png' )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
